<template>
  <el-tabs type="border-card">
  <el-tab-pane label="膳食方案">
    <el-table
  :header-cell-style="{'text-align':'center'}"
    :cell-style="{'text-align':'center'}"
    :data="interposefood"
    height="250"
    style="width: 100%;font-size: 20px;">
    <el-table-column
      prop="recommendfood"
      label="推荐食物"
      width="350">
    </el-table-column>
    <el-table-column
      prop="eattimes"
      label="餐次"
      width="300">
    </el-table-column>
   
    <el-table-column
      prop="foodquantity"
      label="份量"
      width="200">
    </el-table-column>
    <el-table-column
      prop="adi"
      label="摄入量">
    </el-table-column>
  </el-table>
  </el-tab-pane>
  <el-tab-pane label="运动方案">
    <el-table
  :header-cell-style="{'text-align':'center'}"
    :cell-style="{'text-align':'center'}"
    :data="interposesprot"
    height="250"
    style="width: 100%;font-size: 20px;">
    <el-table-column
      prop="sportname"
      label="运动名称"
      width="300">
    </el-table-column>
    <el-table-column
      prop="sporttime"
      label="运动时间"
      width="350">
    </el-table-column>
    <el-table-column
      prop="sportcycle"
      label="运动周期"
      width="200">
    </el-table-column>
    <el-table-column
      prop="consumecount"
      label="消耗量">
    </el-table-column>
  </el-table>
  </el-tab-pane>
  <el-tab-pane label="干预计划">
    <el-table
  :header-cell-style="{'text-align':'center'}"
    :cell-style="{'text-align':'center'}"
    :data="interposescheme"
    height="250"
    style="width: 100%;font-size: 20px;">
    <el-table-column
      prop="schemetittle"
      label="方案标题"
      width="200">
    </el-table-column>
    <el-table-column
      prop="modelid"
      label="选用模板"
      width="200">
    </el-table-column>
    <el-table-column
      prop="starttime"
      label="开始时间"
      width="250">
    </el-table-column>
    <el-table-column
      prop="endtime"
      label="结束时间"
      width="250">
    </el-table-column>
    <el-table-column
      prop="schemetarget"
      label="方案目标">
    </el-table-column>
  </el-table>
  </el-tab-pane>
</el-tabs>
</template>

<script>
export default {
data () {
    return {
      interposefood:"",
      interposesprot:"",
      interposescheme:''
    }
},
methods:{
show(){
  this.axios
        .get("/rear/select", {
          params: { memberid: this.$store.state.name.id},
        }).then((rep) => {
          this.interposefood = rep.data;
       
        });
},
show1(){
  this.axios
        .get("/rear/showinter", {
          params: { memberid: this.$store.state.name.id},
        }).then((rep) => {
          this.interposesprot = rep.data;
          
        });
},
show3(){
  this.axios
        .get("/rear/intershow", {
          params: { memberid: this.$store.state.name.id},
        }).then((rep) => {
          this.interposescheme = rep.data;
         console.log(rep.data)
        });
},
},
created(){
    this.show();
    this.show1();
    this.show3();
  }
}
</script>

<style scoped>

</style>